<!DOCTYPE html>
<html>
    
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="renderer" content="webkit">
        <title>
            登录 - 老师上门
        </title>
        <meta name="Keywords" content="上门,老师上门,家教,课外辅导,艺考,高考,中考,小升初,1对1">
        <meta name="description" content="老师上门，中国最专业的中小学名师预约辅导平台。严格的老师认证审核体系，安全可靠的资金保障系统，试听满意再上课。">
        <link rel="stylesheet" type="text/css" href="__PUBLIC__/home/css/sishu_teacher_index.css" media="all">
        <link rel="stylesheet" type="text/css" href="__PUBLIC__/home/css/sishu_teacher_base.css" media="all">
        <link href="__PUBLIC__/home/css/header2_9.css" rel="stylesheet" type="text/css" media="all">

        <link rel="shortcut icon" type="image/x-icon" href="/sp/favicon.ico" />
        <link rel="icon" type="image/x-icon" href="/sp/favicon.ico" />

        <link href="__PUBLIC__/css/layui.css" rel="stylesheet" type="text/css"media="all" />
        <script type="text/javascript" src="__PUBLIC__/layui.js"></script>
        <script type="text/javascript" src="__PUBLIC__/home/js/jquery.min.js"></script>
    </head>
    
    <body class="has-js">
        <div class="container">
            <div>
                <a class="back" href="{:U('index/index',array('newcity'=>$city))}" target="_self">
                    返回老师上门首页
                </a>
            </div>
            <div class="layout">
                <div class="center">
                    <div class="logo">
                        <a href="index.html">
                            <img src="__PUBLIC__/home/images/hls-logo.png" alt="">
                        </a>
                    </div>
                    <form class="form layui-form" method="post">
                        <div>
                            <img src="__PUBLIC__/home/images/username.png" alt="" class="input_img" id="username_img">
                            <input required  lay-verify="required" name="phone" class="input" autocomplete="off" placeholder="&nbsp;手机号" type="text">
                            <p class="tips bd_radius" id="m_error">
                                账号正确
                            </p>
                        </div>
                        <div>
                            <img src="__PUBLIC__/home/images/password.png" alt="" class="input_img"
                            id="password_img">
                            <input required  lay-verify="required" name="password" placeholder="&nbsp;密码" class="input password" type="password">
                            <p class="tips bd_radius" id="p_error">
                                密码正确
                            </p>
                        </div>
                        <div>
                            <input class="vertical" id="remember" value="" checked="checked" type="checkbox" disabled>
                            <label for="remember" class="vertical" style="margin-left:5px;">
                                记住我
                            </label>
                            <a href="{:U('user/zhao_password',array('newcity'=>$city))}" class="vertical" style="margin-left:165px;text-decoration:underline;color:#000;">
                                忘记密码
                            </a>
                        </div>
                        <!-- <div class="yanzheng">
                            <input placeholder="请输入验证码" class="yzm bd_radius vertical" type="text">
                            <img id="vimg" src="__PUBLIC__/home/images/v_code.png" alt="点击刷新验证码" title="点击刷新验证码"
                            style="cursor:pointer;" class="vertical" height="22" width="50">
                            <span style="color:#aaa">
                                点击左侧图片切换验证码
                            </span>
                        </div> -->
                        <button class="btn-orig o-k" lay-submit lay-filter="*" style="background-color: #30c76c;border: 0px;">确定</button>
                        <p style="margin-left:122px;">
                            <a href="{:U('index/index',array('newcity'=>$city))}" style="text-decoration:underline;color:#30363a;margin-left:5px;"
                            target="_blank">
                                立即注册
                            </a>
                        </p>
                    </form>
                </div>
            </div>
        </div>
        
<!-- 尾部 -->
<include file="Public:fooder" />

        <script type="text/javascript">
            layui.use(['form'], function(){
              var layer = layui.layer
              ,form = layui.form();
              //layer.msg('Hello World');

            form.on('submit(*)', function(data){
                $.ajax({
                    url: "{:U('user/login')}",//请求地址
                    type: "post",//请求方式
                    dataType: "json",//返回数据类型
                    data: data.field,//发送的参数
                    })
                    .done(function(response) {
                          if(response.error==0){
                             layer.msg(response.info ,{icon:5});

                          }else{
                             layer.msg(response.info ,{icon:6});
                             location.href = response.url;
                          }
                      })
                    .fail(function() {
                        alert("ajxs交互失败");
                    })  

                  return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
                });  



            });
        </script>

    </body>

</html>